require 'class'
require 'player_list'
if Pot == nil then Pot = class({}) end

function Pot:constructor(amount, playersInPot)
    self.playersInPot = playersInPot or PlayerList()
    self.amountInPot = amount or 0
    self.minimumRaise = 0
    self.maximumAmountPutIn = 0
    self.agressorIndex = -1
    self.smallBlind, bigBlind = 0
end
function Pot:SmallBlind(val)
    self.smallBlind = val or self.smallBlind
    return self.smallBlind
end
function Pot:BigBlind(val)
    self.bigBlind = val or self.bigBlind
    return self.bigBlind
end
function Pot:MinimumRaise(val)
    self.minimumRaise = val or self.minimumRaise
    return self.minimumRaise
end
function Pot:Amount(val)
    self.amountInPot = val or self.amountInPot
    return self.amountInPot
end
function Pot:MinimumAllInAmount(val)
    self.minimumAllInAmount = val or self.minimumAllInAmount
    return self.minimumAllInAmount
end
function Pot:PlayersAllInCount(val)
    if val ~= nil and val < 0 then val = 0 end
    self.playersAllInCount = val or self.playersAllInCount
    return self.playersAllInCount
end
function Pot:AmountInPotBeforeAllIn(val)
    if val ~= nil and val < 0 then val = 0 end
    self.amountInPotBeforeAllIn = val or self.amountInPotBeforeAllIn
    return self.amountInPotBeforeAllIn
end
function Pot:AgressorIndex(val)
    self.agressorIndex = val or self.agressorIndex
    return self.agressorIndex
end
function Pot:GetPlayersInPot()
    return self.playersInPot
end
function Pot:AddPlayer(player)
    self.playersInPot:Add(player)
    return self.playersInPot
end
function Pot:Add(amout)
    if amount == nil or amount < 0 then return end
    self.amountInPot = self.amountInPot + amount
end
function Pot:MaximumAmountPutIn(val)
    self.maximumAmountPutIn = val or maximumAmountPutIn
    return self.maximumAmountPutIn
end
